Skip to content

feat(mcp): create_event tool - #261

Merged
jplanckeel merged 1 commit into
chore/remove-python-mcpfrom
feat/mcp-create-event
Nov 4, 2026
Merged

jplanckeel merged 1 commit into
chore/remove-python-mcpfrom
feat/mcp-create-event

Conversation

@jplanckeel

Copy link
Copy Markdown
Contributor

What

Stacked on #260 (removal of the Python MCP server): merge #260 first, this PR then retargets main.

New MCP tool create_event, so an assistant can record a deployment, operation, drift, incident or RPA usage.

  • Calls the CreateEvent RPC under its own name (rpcContext), like the read tools: event:write and the team scope apply exactly as on the REST API, and the same side effects happen (changelog entry, automatic lock).
  • Required: title, type, service, environment, status. Optional: priority (default P3), message, source (default mcp), owner (default the caller: user name for a session, apikey:<prefix> for a key), start_date (default now), end_date, impact, pull_request_link, ticket, related_id.
  • Dates: YYYY-MM-DD or RFC 3339; end_date before start_date is rejected.
  • A deployment or operation created with start / in_progress locks its service in its environment, and fails if it is already locked. The tool description says so, so the agent can explain the error.
  • Annotations: readOnlyHint: false, destructiveHint: false, openWorldHint: false: clients that auto-approve read-only tools will ask before creating.

Docs: docs/MCP_SERVER.md (tool table, defaults, event:write for the MCP key, note that the transitional anonymous permissions include writing) and FEATURES.md.

Checks

  • New TestMCPCreateEvent over the real auth middleware: team key creates in its scope (defaults, dates, links, readable with get_event), session user is the owner, lock taken on start, refused when already locked, out of scope, anonymous without permission, invalid inputs (unknown type, blank title, missing status, bad date, end before start). TestMCPListsReadOnlyTools now expects create_event as the only non read-only tool.
  • Live serv: tools/list shows the annotations and the 5 required fields; create_event creates the event (visible in events/today) and its lock; a second start on the same service is refused with the lock message.
  • MONGO_TEST_URI=… go test ./..., gosec, staticcheck: OK.

🤖 Generated with Claude Code

Agents can record an event through the MCP endpoint. The tool calls the
CreateEvent RPC, so event:write and the team scope apply as on the REST
API, and a deployment or operation that starts locks its service.

Required: title, type, service, environment, status. Defaults: priority
P3, source mcp, owner the caller (user name or apikey:<prefix>), start
date now. Annotated as not read-only and not destructive.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jplanckeel jplanckeel closed this Oct 30, 2026
@jplanckeel jplanckeel reopened this Oct 30, 2026
@jplanckeel
jplanckeel merged commit a0e0e79 into chore/remove-python-mcp Nov 4, 2026
1 check passed
@jplanckeel
jplanckeel deleted the feat/mcp-create-event branch November 4, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant